/**
 * Alibaba.com.cn Inc.
 * Copyright (c) 2004-2021 All Rights Reserved.
 */
package com.starlink.common.enums;

import java.util.Arrays;

/**
 * @author zhanghong
 * @version OrderTypeEnum.java, v 0.1 2024/4/11 22:26 下午 OrderTypeEnum Exp $$
 */
public enum AcquireModeEnum {

    XIN_SHOU(0, "新手任务"),
    RI_CHANG(1, "日常任务"),
    XIAO_FEI(2, "消费行为"),
    CHUAN_BO(3, "传播分享"),
    TUI_KUAN(4, "消费退款"),
    POINT_XIAO_FEI(5,"积分消费"),
    JOIN_STAR_PAINT_ACTIVITY(5,"参加活动"),
    ;

    private Integer type;
    private String desc;

    public Integer getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    AcquireModeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static AcquireModeEnum getByType(Integer type) {
        if (type == null) {
            return null;
        }
        return Arrays.stream(values()).filter(item -> type.equals(item.getType())).findFirst().orElse(null);
    }
}
